

# 93.复原IP地址

def main(str):
    result = []
    temp = []
    def judge(strs):
        if strs[0] == '0' and len(strs)!=1:
            return False
        number = int(strs)
        if number>255 or number<0:
            return False
        return True

    def backtrack(str,startIndex):
        judgeLength = ''
        for i in range(0,len(temp)):
            judgeLength = judgeLength + temp[i]
        if len(temp)==4 and len(judgeLength)==len(str):
            for i in range(0,4):
                if judge(temp[i]) == False:
                    return
            oneResult = ''
            for i in range(0,len(temp)):
                oneResult = oneResult + temp[i]
                if i != len(temp)-1:
                    oneResult = oneResult+'.'
            result.append(oneResult)
        for j in range(startIndex,len(str)):
            temp.append(str[startIndex:j+1])
            backtrack(str,j+1)
            temp.pop()
    backtrack(str,0)
    return result

if __name__ == "__main__":
    str = input()
    result = main(str)
    print(result)